package com.jnmd.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.jnmd.mapper.SpeakerMapper;
import com.jnmd.pojo.Speaker;
import com.jnmd.service.SpeakerService;

@Service
public class SpeakerServiceImpl implements SpeakerService {

	@Autowired
	private SpeakerMapper speakerMapper;
	
	@Override
	public List<Speaker> getAllSpeaker() {
		
		return speakerMapper.getAllSpeaker();
	}

	@Override
	public void addSpeaker(Speaker speaker) {
		
		speakerMapper.addSpeaker(speaker);
		
	}

	@Override
	public Speaker editSpeaker(int id) {
		
		return speakerMapper.editSpeaker(id);
	}

	@Override
	public void updateSpeaker(Speaker speaker) {
		
		speakerMapper.updateSpeaker(speaker);
	}

	@Override
	public int deleteSpeaker(int id) {
		
		return speakerMapper.deleteSpeaker(id);
	}

}
